<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<style type="text/css">
table{
 text-align: left;
}
#qx{
 color:blue;
}
</style>
<script type="text/javascript">
function ss(){
    $("tr").attr("target","");
    $("tr").attr("rel","");
}
  function tr(){
  var ss=$("table input:checked").val();
  $("tr").attr("rel",ss);
  $("tr").attr("target","sid_user");

  }
  </script>

   <form id="pagerForm" method="post" action="<%=basePath %>breakage/find.do">
	<input type="hidden" name="pageNum" value="${requestScope.condition.pageNum}" />
	<input type="hidden" name="numPerPage" value="${requestScope.condition.numPerPage}" />	
	<input type="hidden" name="roleid" value="${requestScope.condition.roleid}">
	<input type="hidden" name="name" value="${requestScope.condition.name}" />
</form>
<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="<%=basePath %>role/message.do" method="post">
	<div class="searchBar">
		<table class="searchContent">
		  <tr>
		    <td>角色名：</td><td><input type="text" name="name" value="" /></td>
            <td>角色编号：</td><td><input type="text" name="roleid" value="" /></td>
            
		  </tr>
		</table>
			<div class="subBar">
			<ul>
			    <li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
				
			</ul>
		</div>	
		</div>	
</form>
</div>


<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="edit" href="<%=basePath %>role/look.do?id={sid_user}" onclick="ss()" target="dialog" mask="true" title="修改信息" ><span>修改</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="138" height="200px">
		<thead>
			<tr>
			    <th width="2%"></th>
				<th width="2%"><br></th>
				<th width="20%">角色编号</th>
				<th width="10%">角色名</th>
				<th width="8%">简称</th>
				<th width="8%">状态</th>
				<th width="10%">描述</th>
				<th width="8%">创建时间</th>
				<th width="8%" align="center">操作</th>
			</tr>
		</thead>
		<tbody>
	    <c:forEach items="${requestScope.list}" var="role" varStatus="ff">
	       <tr  target="" rel="">
	       <td width="2%" align="center">${ff.index+1 }</td>
				<td width="2%" align="center"><input type="checkbox" name="abc" value="${role.roleid }" onclick="tr()"/></td>
				<td width="20%">${role.roleid }</td>
				<td width="10%">${role.name }</td>
				<td width="8%">${role.short_key }</td>
				<td width="8%">${role.status }</td>
				<td width="10%">${role.description }</td>
				<td width="8%">${role.create_time }</td>
				<td width="8%" align="center"><a href="<%=basePath %>menu/buildopertree.do?roleid=${role.roleid}" target="dialog" mask="true" title="权限修改"  width="500" height="300" id="qx">关联权限</a></td>
	       
	       </tr>
	    </c:forEach>
		</tbody>
		
	</table>
	
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="10">10</option>
				<option value="20">20</option>
				<option value="50">50</option>
			</select>
			<span>条，共${requestScope.condition.totalCount}条</span>
		</div>
		<div class="pagination" targetType="navTab" totalCount="${requestScope.condition.totalCount}" numPerPage="${requestScope.condition.numPerPage}" pageNumShown="5" currentPage="${requestScope.condition.pageNum}"></div>
		</div>
</div>

